package com.lengxf.kafka.consumer;

import lombok.extern.slf4j.Slf4j;
import org.springframework.kafka.annotation.KafkaListener;
import org.springframework.stereotype.Component;

@Slf4j
@Component
public class Consumer {

    /**
     * 若cpu太弱可独立配置 TopicPartition 分布式部署
     *
     * @Author Lengxf
     */
//    @KafkaListener(topics = "data.*", concurrency = "3")
//    public void processMessage(String record) {
//        log.info("record : {}", record);
//    }
//
    @KafkaListener(topics = "data_topic", concurrency = "3")
    public void p1(String record) {
        log.info("record : {}", record);
    }

    @KafkaListener(topics = "field_change", concurrency = "3")
    public void field_change(String record) {
        log.info("field_change1 : {}", record);
    }

//    @KafkaListener(topics = "eq_status", concurrency = "3")
//    public void p2(String record) {
//        log.info("record : {}", record);
//    }

}
